<template>
  <div>
    <svg-icon @click="changeScreen" icon-class='fullscreen' style="color:#fff; width: 20px; height: 20px" />
  </div>
</template>

<script>
import ScreenFull from 'screenfull'
export default {
  methods: {
    changeScreen(){
      //当前浏览器是否支持全屏
      if (!ScreenFull.isEnabled) {
        this.$message.warning('当前全屏功能不可用')
        return
      }
      ScreenFull.toggle() //全屏的方法

    }
  }
}
</script>

<style>

</style>